// 用户管理专用接口
import request from '@/utils/request'

// 获得看板数据
export const getDataPlnel = () => {
  return request.get('/user/search/Info')
}

// 获取表格数据
export const getTable = ({ page, size, userName, userPhone }) => {
  return request.get('/user/search/one', {
    params: {
      page,
      size,
      userName,
      userPhone

    }
  })
}
// 获取用户信息详情显示
export const getDetail = (userPhone) => {
  return request.get('/user/detail', {
    params: {
      phone: userPhone
    }
  })
}

// 获取用户登录地点
export const getAddress = ({ page, size, phone }) => {
  return request.get('/user/loginSite', {
    params: {
      phone: phone,
      page: page,
      size: size
    }
  })
}

// 获取用户建议
export const getAdvise = (userPhone) => {
  return request.get('/user/advise', {
    params: {
      phone: userPhone
    }
  })
}

// 禁用用户
export const stop = ({ phone, reason }) => {
  return request.get('/user/stop', {
    params: {
      phone: phone,
      reason: reason
    }
  })
}

// 导出用户
export const exportUser = ({ listId, timeZone }) => {
  return request.get('/user/export', {
    params: {
      listId,
      timeZone
    },
    responseType: 'blob'
  })
}
